/**
 * Created by hxsd on 2017/6/24.
 */


    $(document).scroll(function () {
        if($(document).scrollTop()>950){
            $('.xxxxxx').css({'position':'fixed','top':0,'zIndex':'100','width':'100%'})
        }else{
            $('.xxxxxx').css({'position':'relative'})
        }
    });
    //轮播时间控制
    $('.carousel').carousel({
        interval: 1500
    });
    $('.btnAbout').on('click',function () {
        $('.about').velocity('scroll',500);
    });
    $('.btnProject').on('click',function () {
        $('.portfolio').velocity('scroll',501);
    });
    $('#body').on('click','.navBar',function () {
        var html=$(this).html().toLowerCase();                     /*根据a里面的内容找到对应的部位；*/
        $('.'+html).velocity('scroll',500);
        if($(document).width()<750){
        $('.navbar-toggle').trigger('click')
        }
    });
    $(window).on('load', function(){
        $('body').addClass('loaded');
    });









